package tt.dz.entity.charger;

import java.io.Serializable;
import java.util.Date;

import tt.dz.util.annotation.PrimaryKey;
import tt.dz.util.annotation.Table;

/**
 * 充电记录
 * 
 * @author pengyu
 * 
 */
@Table(name = "oms_charger_charge_bill_record")
public class OmsChargerChargeBillRecord implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1735039356570862815L;
	@PrimaryKey
	private String charge_jrnl;
	//下发报文充电流水号:格式为:YYYY-MM-DD-HH-MI-SS加上四位序号 例如：
	//报文开始充电流水号  0x20 0x15 0x05 0x10 0x21 0x45 0x34,0x00,0x00表示2015年5月10日21点击5分34秒第一个流水号（同一时刻自增）
	private String msg_charge_jrnl;
	//报文结束充电流水号  0x20 0x15 0x05 0x10 0x21 0x45 0x34,0x00,0x00表示2015年5月10日21点击5分34秒第一个流水号（同一时刻自增）
	private String msg_charge_end_jrnl;
	private String charger_id;
	/** 用户卡号 */
	private String user_pay_card;
	private Float char_bill_before;
	private Float char_bill;
	/** 由业务规则按一定规律生成 */
	private String station_id;
	private Date start_time;
	private Date end_time;
	private String duration;//充电时长：以时分秒来表示
	private String start_em;
	private String end_em;
	private String this_reading;
	private Float this_amount_before;
	private Float this_amount;
	private String offline_balance_start;//开始充电前线下卡余额
	private String offline_balance_end;//充电后线下卡余额
	/** 0 线下未结算,1 线下已结算，2 线上未结算 ，3 线上已结算 */
	private Integer offline_is_pay;
	private Date create_time;
	/** 如果为空，则表明是未预约充电。0000000000为非真实数据。 */
	private String bespeak_jrnl;
	/**
	 * 0 开启充电：已下发指令未回复；\r\n 1 充电中 ：已确认桩回复；\r\n 2 电充满未结束：如未拔枪则是此状态； \r\n 3
	 * 关闭充电：已下发指令 ；\r\n 4 充电结束 ：桩回复充电结束 ；\r\n 5 已生成账单；\r\n 6 已结算 ；\r\n 7 已退款
	 * ；\r\n 8 充电失败。
	 */
	private Integer status;
	/** 由于桩有双枪三枪可能，所以需要此字段 */
	private Integer port;
	
	//端口序号:充电口号, 从0开始
	private Integer port_no;
	
	private Integer valid_flag;

	private String charge_end_reason;//充电结束原因
	private Integer start_type;//启动方式：0：即时充电；1：定时启动
	private String charge_start_mode;//充电启动方式 0x00：后台远程启动 0x01: 本地刷卡远程验证启动  0x02：本地刷卡白名单验证启动
	private String control_type;//控制类型  参考控制类型表对应数据，如0x04为自动充满方式。
	private String open_restricted_data;//开启限制数据  自动充满停机方式下无意义。低字节在前，高字节在后。电量控制,单位为“度”，精确到0.01,传输数据放大100倍；时间控制，单位为“秒“，精确到1,；金额控制，单位为“元”，精确到0.01，传输数据放大100倍。
	private String VIN;//车辆识别码

	private String order_no;//订单号
	

	public OmsChargerChargeBillRecord() {
		super();
	}

	 

	public OmsChargerChargeBillRecord(String charge_jrnl) {
		super();
		this.charge_jrnl = charge_jrnl;
	}
	//由于charge_jrnl是主键，查询方法中很多时候又需要用msg_charge_jrnl做条件，所以建立此构造方法，Object obj暂时用不到
	public OmsChargerChargeBillRecord(String msg_charge_jrnl,Object obj) {
		super();
		this.msg_charge_jrnl = msg_charge_jrnl;
	}

	//新增时使用，目前用在AbstractCardBillProcess类的ProcessBill方法中
	public OmsChargerChargeBillRecord(String charge_jrnl, String charger_id, String user_pay_card,
			Float char_bill_before, Float char_bill, String station_id, String start_em, String end_em,
			String this_reading, Float this_amount_before, Float this_amount, String offline_balance_end,
			Integer status, Integer port_no, Integer valid_flag, String vin, String order_no) {
		super();
		this.charge_jrnl = charge_jrnl;
		this.charger_id = charger_id;
		this.user_pay_card = user_pay_card;
		this.char_bill_before = char_bill_before;
		this.char_bill = char_bill;
		this.station_id = station_id;
		this.start_em = start_em;
		this.end_em = end_em;
		this.this_reading = this_reading;
		this.this_amount_before = this_amount_before;
		this.this_amount = this_amount;
		this.offline_balance_end = offline_balance_end;
		this.status = status;
		this.port_no = port_no;
		this.valid_flag = valid_flag;
		this.VIN = vin;
		this.order_no = order_no;
	}



	public String getMsg_charge_jrnl() {
		return msg_charge_jrnl;
	}

	public void setMsg_charge_jrnl(String msg_charge_jrnl) {
		this.msg_charge_jrnl = msg_charge_jrnl;
	}

	public String getMsg_charge_end_jrnl() {
		return msg_charge_end_jrnl;
	}

	public void setMsg_charge_end_jrnl(String msg_charge_end_jrnl) {
		this.msg_charge_end_jrnl = msg_charge_end_jrnl;
	}

	public String getCharge_end_reason() {
		return charge_end_reason;
	}

	public void setCharge_end_reason(String charge_end_reason) {
		this.charge_end_reason = charge_end_reason;
	}

	public String getCharge_start_mode() {
		return charge_start_mode;
	}

	public void setCharge_start_mode(String charge_start_mode) {
		this.charge_start_mode = charge_start_mode;
	}

	public String getControl_type() {
		return control_type;
	}

	public Integer getPort_no() {
		return port_no;
	}

	public void setPort_no(Integer port_no) {
		this.port_no = port_no;
	}

	public void setControl_type(String control_type) {
		this.control_type = control_type;
	}

	public String getOpen_restricted_data() {
		return open_restricted_data;
	}

	public void setOpen_restricted_data(String open_restricted_data) {
		this.open_restricted_data = open_restricted_data;
	}

 

	public String getVIN() {
		return VIN;
	}

	public void setVIN(String vIN) {
		VIN = vIN;
	}

	public String getCharge_jrnl() {
		return charge_jrnl;
	}

	public void setCharge_jrnl(String charge_jrnl) {
		this.charge_jrnl = charge_jrnl;
	}

	public String getCharger_id() {
		return charger_id;
	}

	public void setCharger_id(String charger_id) {
		this.charger_id = charger_id;
	}

	public String getUser_pay_card() {
		return user_pay_card;
	}

	public void setUser_pay_card(String user_pay_card) {
		this.user_pay_card = user_pay_card;
	}

	public String getOffline_balance_start() {
		return offline_balance_start;
	}

	public void setOffline_balance_start(String offline_balance_start) {
		this.offline_balance_start = offline_balance_start;
	}

	public String getOffline_balance_end() {
		return offline_balance_end;
	}

	public void setOffline_balance_end(String offline_balance_end) {
		this.offline_balance_end = offline_balance_end;
	}

	public String getStation_id() {
		return station_id;
	}

	public void setStation_id(String station_id) {
		this.station_id = station_id;
	}

	public Date getStart_time() {
		return start_time;
	}

	public void setStart_time(Date start_time) {
		this.start_time = start_time;
	}

	public Date getEnd_time() {
		return end_time;
	}

	public void setEnd_time(Date end_time) {
		this.end_time = end_time;
	}

	public String getStart_em() {
		return start_em;
	}

	public void setStart_em(String start_em) {
		this.start_em = start_em;
	}

	public String getEnd_em() {
		return end_em;
	}

	public void setEnd_em(String end_em) {
		this.end_em = end_em;
	}

	public String getThis_reading() {
		return this_reading;
	}

	public void setThis_reading(String this_reading) {
		this.this_reading = this_reading;
	}

 
	public Float getThis_amount_before() {
		return this_amount_before;
	}

	public void setThis_amount_before(Float this_amount_before) {
		this.this_amount_before = this_amount_before;
	}

	public Float getThis_amount() {
		return this_amount;
	}

	public void setThis_amount(Float this_amount) {
		this.this_amount = this_amount;
	}

	public Integer getOffline_is_pay() {
		return offline_is_pay;
	}

	public void setOffline_is_pay(Integer offline_is_pay) {
		this.offline_is_pay = offline_is_pay;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}

	public String getBespeak_jrnl() {
		return bespeak_jrnl;
	}

	public void setBespeak_jrnl(String bespeak_jrnl) {
		this.bespeak_jrnl = bespeak_jrnl;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		this.port = port;
	}

	public Integer getValid_flag() {
		return valid_flag;
	}

	public void setValid_flag(Integer valid_flag) {
		this.valid_flag = valid_flag;
	}

	public Float getChar_bill() {
		return char_bill;
	}

	public void setChar_bill(Float char_bill) {
		this.char_bill = char_bill;
	}

	
	
	public String getDuration() {
		return duration;
	}

	public void setDuration(String duration) {
		this.duration = duration;
	}

	@Override
	public String toString() {
		return "OmsChargerChargeBillRecord [charge_jrnl=" + charge_jrnl + ", oms_msg_charge_jrnl=" + msg_charge_jrnl
				+ ", charger_id=" + charger_id + ", user_pay_card=" + user_pay_card + ", char_bill=" + char_bill
				+ ", station_id=" + station_id + ", start_time=" + start_time + ", end_time=" + end_time + ", duration="
				+ duration + ", start_em=" + start_em + ", end_em=" + end_em + ", this_reading=" + this_reading
				+ ", this_amount_before=" + this_amount_before + ", this_amount=" + this_amount
				+ ", offline_balance_start=" + offline_balance_start + ", offline_balance_end=" + offline_balance_end
				+ ", offline_is_pay=" + offline_is_pay + ", create_time=" + create_time + ", bespeak_jrnl="
				+ bespeak_jrnl + ", status=" + status + ", port=" + port + ", port_no=" + port_no + ", valid_flag="
				+ valid_flag + ", charge_end_reason=" + charge_end_reason + ", charge_start_mode=" + charge_start_mode
				+ ", control_type=" + control_type + ", open_restricted_data=" + open_restricted_data + ", VIN=" + VIN
				+ "]";
	}

	public Integer getStart_type()
	{
		return start_type;
	}

	public void setStart_type(Integer start_type)
	{
		this.start_type = start_type;
	}

	public String getOrder_no()
	{
		return order_no;
	}

	public void setOrder_no(String order_no)
	{
		this.order_no = order_no;
	}

	public Float getChar_bill_before()
	{
		return char_bill_before;
	}

	public void setChar_bill_before(Float char_bill_before)
	{
		this.char_bill_before = char_bill_before;
	}
}
